package cn.tedu.teacher;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Scope;

@Configuration
public class TeacherConfig {
    @Bean
    @Scope("prototype")
    public Teacher teacher(){
        Teacher teacher=new Teacher();
        teacher.setId(1001);
        teacher.setName("苍老师");
        teacher.setMajor("java");
        return teacher;
    }

}
